import { ref, onMounted } from 'vue'
import { _getBanner } from '@/apis/home'

export const userBanner = () => {
  const bannerList = ref([])
  const getBanner = async () => {
    const { data: res } = await _getBanner({ distributionSite: '2' })
    bannerList.value = res.result || []
  }
  onMounted(() => {
    getBanner()
  })
  return {
    bannerList
  }
}